const hello = (name: string) => {
  return `hello ${name}`
}
// 基本类型
let flag: boolean = false
let age: number = 23
let firstName: string = 'XD'
let message: string = `Hello ${firstName}`
// undefined和null是所有类型的子类型
let und: undefined = undefined
let nul: null = null
// any可以是任意类型
let random: any = '2'
random = 2
random = true
// 联合类型
let numOrString: number | string = 1
numOrString = '1'
// numOrString = true
// 定义数组
let arrOfNum: number[] = [1, 2, 3, 4]
// 类数组 Iarguments
// 元组Tuple 合并不同类型的数组
let user: [string, number] = ['XD', 23]
console.log(hello('world'))
